# $Id$
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=libmpdclient
pkgver=2.11
pkgrel=1
pkgdesc='Asynchronous API library for interfacing MPD in the C, C++ & Objective C languages'
url='https://www.musicpd.org/libs/libmpdclient/'
license=('custom:BSD')
arch=('i686' 'x86_64')
validpgpkeys=('0392335A78083894A4301C43236E8A58C6DB4512')
source=("https://www.musicpd.org/download/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"{,.sig})
sha256sums=('15fe693893c0d7ea3f4c35c4016fbd0332836164178b20983eec9b470846baf6'
            'SKIP')

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	./configure --prefix=/usr --disable-documentation
	make
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" install

	cd "${pkgdir}"
	install -d usr/share/licenses/libmpdclient
	ln -s ../../doc/libmpdclient/COPYING usr/share/licenses/libmpdclient/COPYING
}
